Integrand size = 22, antiderivative size = 87 \[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\frac {(e x)^n}{a e n}-\frac {2 b x^{-n} (e x)^n \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d e n} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {5548, 5544, 3868, 2738, 214} \[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\frac {(e x)^n}{a e n}-\frac {2 b x^{-n} (e x)^n \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a d e n \sqrt {a-b} \sqrt {a+b}} \]
[In]
[Out]
Rule 214
Rule 2738
Rule 3868
Rule 5544
Rule 5548
Rubi steps \begin{align*} \text {integral}& = \frac {\left (x^{-n} (e x)^n\right ) \int \frac {x^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx}{e} \\ & = \frac {\left (x^{-n} (e x)^n\right ) \text {Subst}\left (\int \frac {1}{a+b \text {sech}(c+d x)} \, dx,x,x^n\right )}{e n} \\ & = \frac {(e x)^n}{a e n}-\frac {\left (x^{-n} (e x)^n\right ) \text {Subst}\left (\int \frac {1}{1+\frac {a \cosh (c+d x)}{b}} \, dx,x,x^n\right )}{a e n} \\ & = \frac {(e x)^n}{a e n}+\frac {\left (2 i x^{-n} (e x)^n\right ) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,i \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a d e n} \\ & = \frac {(e x)^n}{a e n}-\frac {2 b x^{-n} (e x)^n \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d e n} \\ \end{align*}
Time = 0.65 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.92 \[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\frac {(e x)^n \left (d+c x^{-n}+\frac {2 b x^{-n} \arctan \left (\frac {(-a+b) \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}\right )}{a d e n} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.85 (sec) , antiderivative size = 317, normalized size of antiderivative = 3.64
method | result | size |
risch | \(\frac {x \,{\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right ) \pi +i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi +i \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi -i \operatorname {csgn}\left (i e x \right )^{3} \pi +2 \ln \left (e \right )+2 \ln \left (x \right )\right )}{2}}}{a n}-\frac {2 b \,{\mathrm e}^{-\frac {i \pi n \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )}{2}} {\mathrm e}^{\frac {i \pi n \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2}}{2}} {\mathrm e}^{\frac {i \pi n \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2}}{2}} {\mathrm e}^{-\frac {i \pi n \operatorname {csgn}\left (i e x \right )^{3}}{2}} {\mathrm e}^{\frac {i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right ) \pi }{2}} {\mathrm e}^{-\frac {i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi }{2}} {\mathrm e}^{-\frac {i \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi }{2}} {\mathrm e}^{\frac {i \operatorname {csgn}\left (i e x \right )^{3} \pi }{2}} e^{n} {\mathrm e}^{c} \arctan \left (\frac {2 a \,{\mathrm e}^{2 c +d \,x^{n}}+2 \,{\mathrm e}^{c} b}{2 \sqrt {a^{2} {\mathrm e}^{2 c}-{\mathrm e}^{2 c} b^{2}}}\right )}{a n e d \sqrt {a^{2} {\mathrm e}^{2 c}-{\mathrm e}^{2 c} b^{2}}}\) | \(317\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 240 vs. \(2 (78) = 156\).
Time = 0.30 (sec) , antiderivative size = 511, normalized size of antiderivative = 5.87 \[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\left [\frac {{\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) \cosh \left (n \log \left (x\right )\right ) + {\left (a^{2} - b^{2}\right )} d \cosh \left (n \log \left (x\right )\right ) \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right ) - {\left (\sqrt {-a^{2} + b^{2}} b \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) + \sqrt {-a^{2} + b^{2}} b \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right )\right )} \log \left (\frac {a b + {\left (b^{2} + \sqrt {-a^{2} + b^{2}} b\right )} \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + {\left (a^{2} - b^{2} - \sqrt {-a^{2} + b^{2}} b\right )} \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + \sqrt {-a^{2} + b^{2}} a}{a \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + b}\right ) + {\left ({\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) + {\left (a^{2} - b^{2}\right )} d \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right )\right )} \sinh \left (n \log \left (x\right )\right )}{{\left (a^{3} - a b^{2}\right )} d n}, \frac {{\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) \cosh \left (n \log \left (x\right )\right ) + {\left (a^{2} - b^{2}\right )} d \cosh \left (n \log \left (x\right )\right ) \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right ) + 2 \, {\left (\sqrt {a^{2} - b^{2}} b \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) + \sqrt {a^{2} - b^{2}} b \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right )\right )} \arctan \left (-\frac {\sqrt {a^{2} - b^{2}} a \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + \sqrt {a^{2} - b^{2}} a \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + \sqrt {a^{2} - b^{2}} b}{a^{2} - b^{2}}\right ) + {\left ({\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) + {\left (a^{2} - b^{2}\right )} d \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right )\right )} \sinh \left (n \log \left (x\right )\right )}{{\left (a^{3} - a b^{2}\right )} d n}\right ] \]
[In]
[Out]
\[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\int \frac {\left (e x\right )^{n - 1}}{a + b \operatorname {sech}{\left (c + d x^{n} \right )}}\, dx \]
[In]
[Out]
\[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\int { \frac {\left (e x\right )^{n - 1}}{b \operatorname {sech}\left (d x^{n} + c\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\int { \frac {\left (e x\right )^{n - 1}}{b \operatorname {sech}\left (d x^{n} + c\right ) + a} \,d x } \]
[In]
[Out]
Time = 2.68 (sec) , antiderivative size = 409, normalized size of antiderivative = 4.70 \[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\frac {x\,{\left (e\,x\right )}^{n-1}}{a\,n}-\frac {\left (2\,\mathrm {atan}\left (\frac {a^2\,{\mathrm {e}}^{d\,x^n}\,{\mathrm {e}}^c\,\left (\frac {2\,b\,x\,{\left (e\,x\right )}^{n-1}}{a^4\,d\,n\,x^n\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}+\frac {2\,b\,d\,n\,x^n\,{\left (e\,x\right )}^{1-n}\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{a^2\,x\,\sqrt {a^4\,d^2\,n^2\,x^{2\,n}-a^2\,b^2\,d^2\,n^2\,x^{2\,n}}\,\sqrt {a^2\,d^2\,n^2\,x^{2\,n}\,\left (a^2-b^2\right )}}\right )\,\sqrt {a^4\,d^2\,n^2\,x^{2\,n}-a^2\,b^2\,d^2\,n^2\,x^{2\,n}}}{2}+\frac {a\,d\,n\,x^n\,{\left (e\,x\right )}^{1-n}\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{x\,\sqrt {a^2\,d^2\,n^2\,x^{2\,n}\,\left (a^2-b^2\right )}}\right )+2\,\mathrm {atan}\left (\frac {x\,{\left (e\,x\right )}^{n-1}\,\sqrt {a^2\,d^2\,n^2\,x^{2\,n}\,\left (a^2-b^2\right )}}{a\,d\,n\,x^n\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}\right )\right )\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{\sqrt {a^4\,d^2\,n^2\,x^{2\,n}-a^2\,b^2\,d^2\,n^2\,x^{2\,n}}} \]
[In]
[Out]